/**
 * author:Administrator
 * date:2016/2/24
 * desc:TODO
 */

'use strict';

var RepoImpl = require('../../../infrastructure/persist').OrderRepoImpl;

class OrderRepo {

  static * find(id) {
    return yield RepoImpl.find(id);
  }

  /**
   * @param order
   */
  static * store(order) {
    yield RepoImpl.store(order);
  }

  static * update(where, updateAttr) {
    return yield  RepoImpl.update(where, updateAttr);
  }

  /**
   * 修改order 的支付状态
   * @param id
   * @param t
   */
  static * payOrder(id, t) {
    return yield RepoImpl.payOrder(id, t);
  }
}

module.exports = OrderRepo;
